package com.example.interfaces.dto;

import java.time.LocalDateTime;
import com.example.infrastructure.excel.ExcelExportable;
import com.example.infrastructure.excel.ExcelImportable;
import cn.idev.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.*;

/**
 * 健康资讯表 DTO
 *
 * @author wangal
 * @since 2025-07-25
 */
@Data
@Schema(name = "HealthArticlesDTO", description = "健康资讯表DTO")
public class HealthArticlesDTO implements ExcelExportable, ExcelImportable {

    @Schema(description = "文章标题")
    @ExcelProperty("文章标题")
    @NotBlank(message = "文章标题不能为空")
    private String title;
    
    @Schema(description = "文章摘要")
    @ExcelProperty("文章摘要")
    @NotBlank(message = "文章摘要不能为空")
    private String summary;
    
    @Schema(description = "文章内容")
    @ExcelProperty("文章内容")
    @NotBlank(message = "文章内容不能为空")
    private String content;
    
    @Schema(description = "封面图片")
    @ExcelProperty("封面图片")
    @NotBlank(message = "封面图片不能为空")
    private String coverImage;
    
    @Schema(description = "作者")
    @ExcelProperty("作者")
    @NotBlank(message = "作者不能为空")
    private String author;
    
    @Schema(description = "分类")
    @ExcelProperty("分类")
    @NotBlank(message = "分类不能为空")
    private String category;
    
    @Schema(description = "标签，多个用逗号分隔")
    @ExcelProperty("标签，多个用逗号分隔")
    @NotBlank(message = "标签，多个用逗号分隔不能为空")
    private String tags;
    
    @Schema(description = "浏览次数")
    @ExcelProperty("浏览次数")
    @NotNull(message = "浏览次数不能为空")
    private Integer viewCount;
    
    @Schema(description = "点赞次数")
    @ExcelProperty("点赞次数")
    @NotNull(message = "点赞次数不能为空")
    private Integer likeCount;
    
    @Schema(description = "是否推荐：0否，1是")
    @ExcelProperty("是否推荐：0否，1是")
    private Byte isRecommend;
    
    @Schema(description = "发布时间")
    @ExcelProperty("发布时间")
    private LocalDateTime publishTime;
    
    @Schema(description = "状态：0草稿，1已发布，2已下线")
    @ExcelProperty("状态：0草稿，1已发布，2已下线")
    private Byte status;
    
    @Schema(description = "租户编号")
    @ExcelProperty("租户编号")
    @NotNull(message = "租户编号不能为空")
    private Long tenantId;
    
}
